<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Article List</title>
<link href="./layout.css" rel="stylesheet" type="text/css" />
</head>
<body>
<jsp:include page="./menu.jsp"/>
<div id="main">
	<div align="center"><h3><font color="red">文章列表</font></h3></div>
	<table width="700" border=1 cellpadding=0 cellspacing=0 align="center">
	<caption>${pager.url}</caption>
	<tr>
		<th width="5%">序号</th>
		<th width="25%">标题</th>
		<th width="10%">栏目</th>
		<th width="12%">发布人</th>
		<th width="20%">发布时间</th>
		<th width="20%">操作</th>
	</tr>
	<s:iterator value="pager.data">
	<tr>
		<td>${id}</td>
		<td>
			<s:if test="title.length()>20">
				<s:property value="title.substring(0, 18)+'...'" />
			</s:if> 
			<s:else>
				<s:property value="title" />
			</s:else> 
		</td>
		<td>${channel.name}</td>
		<td>${author}</td>
		<td>${addtime }</td>
		<td>
			<a href="detail?id=<s:property value="id"/>">查看</a> | 
			<a href="edit?id=<s:property value="id"/>">编辑</a>|
			<a href="delete?id=<s:property value="id"/>" OnClick="return confirm('确定删除吗？')">删除</a> 
		</td>
	</tr>
	</s:iterator>
	</table>
</div> 
</div>
</body>
</html>